#!/usr/bin/python3

L = '13 23 78 89 2'
print('L')
print(L)

print('颠倒L')
arr = L.split(' ')
arr.reverse()
Lr = ' '.join(arr)
print(Lr)

print('L从小到大排序')
numArr = [int(x) for x in arr]
sortedNumArr = sorted(numArr)
sortedArr = [str(x) for x in sortedNumArr]
LminToMax = ' '.join(sortedArr)
print(LminToMax)

print('L从大到小排序')
rSortedNumArr = sorted(numArr, reverse=True)
rSortedArr = [str(x) for x in rSortedNumArr]
LmaxToMin = ' '.join(rSortedArr)
print(LmaxToMin)

print('最大的数值')
print(rSortedArr[0])

print('最小的数值')
print(sortedArr[0])
